Addins on Server

Here is tutorial for deploying DXL addins on the server.  Scribbled it up.  Hope it looks good.

Deploying DXL for general use is a bit tricky.  I will say however that the "server" you choose to deploy the DXL has nothing to do with the "server" on which resides the database.  In fact, the database server is likely hidden within some firewall making it "impossible" to use it for general use DXL.

 I'm going to give you the various rules (for future reference), then the various exceptions and nuances, then some examples.  Don't expect to understand everything the 1st time through.  Read it, look at the examples, then re-read it for better understanding.

             Resources:

  • Manual              section..                                               found in chapter..                                  Search help for..
  • DXL Manual      The DXL Library and Addins menus        Rational DOORS window control            "addins"
  • User Manual      Summary of command line switches      Configuring Rational DOORS                 "command line"

 There are 4 different "DXL Menu" contexts:

  • Environment Variable  Controls Menus in..
  • addins                          Formal modules
  • projectaddins                The DOORS Explorer
  • attributeaddins              dxl attribute menu
  • layoutaddins                 dxl layout menu

 Menu Control

            Menu Control Rules

  1. The default location on your client is always parsed for menus, regardless of the value of the above environment variable.
    Your email below shows you have correctly found the various default locations. 
  2. The value of each Environment Variable is parsed where folder "paths" are separated by semi-colons.
  3. If such a path points to an existing "well constructed" folder, then that folder's "Well Constructed" sub-folders and "Well Constructed" dxl files appear as menu in the corresponding context.

             Menu Control  Nuances

  • "Well Constructed" means conforms to the confusing "The DXL Library and Addins menus" and is explained in detail below.
  • The only way to keep the default locations out of the menu is to cause them to be "poorly constructed", such as removing/ renaming the various *.idx or *.hlp files.
    That is ill-advised
  • There must be no spaces touching the semi-colons, although the paths may contain spaces.
  • The top level folder does NOT appear in the menu.  If that location is to represent 1 menu it would have one sub-folder.
  • You can put these variables in the Registry:
    • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Telelogic\DOORS\9.5\Config   - applies for all users of the client PC.
    • HKEY_CURRENT_USER\Software\Telelogic\DOORS\9.5\Config    -  applies for this user, overrides the LocalMachine value.
  • You can put these as command line switches, which override the registry.
  • The Variable values are determined when DOORS starts and cannot be changed in the middle of a DOORS session.
  • The Formal menu is generated each time a module is opened visibly.  If the DXL server is "far away" this can drastically increase module-open times.
  • The Explorer, Attr-DXL, and Layout-menus are generated once when DOORS starts.
  • Relative #include file references are resolved relative to your "addins".

 A "well constructed" FolderRules

Well constructed Folderhas these characteristics:

  1. It can be accessible from the client PC.
  2. It has two files with the exact same base name as the folder; [1] a *.idx" and [2] a *.hlp.  These are text based files.
  3. The "root" folder (pointed to by the environment variable value) does not represent a menu; but each of it's sub-folders does.
    This root folder must still have the *.idx and *.hlp files.  The IDX file is used, the hlp is not.
  4. Thus the 1st level of sub-folder(s) represents the menu(s).
  5. Note that the *.idx and *.hlp files CAN be empty; but that is illadvised.
  6. May contain other files.

 

Well constructed FolderNuances

  • Client PCs must be able to see it using Windows Explorer.
  • If the name of the folder is "ABC" then files "ABC.idx" and "ABC.hlp" must exist.
  • *.hlp files:
    • The 1st line of the *.hlp file appears in the Browse DXL top-window
    • The 2nd and each additional line appears in the Browse DXL lower window, when the item is selected in the top.
  • *.idx files:
    • Left field is the raw name of the DXL file without the ".dxl" part; or the name of a sub-folder
    • Lets skip the two "escape" characters, and presume two underscores
    • Right Field is the text that appears in the menu for that DXL.
    • If a "well constructed" DXL file is not called out in the *.idx, it still appears in the menu, using its base file name.
      Ditto for a "well constructed" sub-folder.
  • The Default Locations for Layouts and Attr-DXL don't use the "top level folder" notion; they point directly to the sub-folder.  Odd.

 

A "well constructed" DXL filerules

A "well constructed" DXL filehas these characteristics:

  • Raw text
  • Has extension ".dxl".  Only.  No other file can appear in the menu.
  • Has a comment LINE     "near" the top.  Single line starting with "//" at the left of the line.
  • Has a comment BLOCK "near" the top.  Block of lines starting with /* and ending with */.  I think the "/*" must start at the left of the line.
  • I don't know how near "near" the top is; I just put them AT the top of the file.

 A "well constructed" DXL fileNuances

  •  Notepad generated file is adequate as are a wide variety of other such raw text tools.
    There are obscure restrictions from other tools I don't understand, such as ""unicode" considerations.
  • Might as well put the comment line as the 1st line followed by the comment block.
  • The Comment Line appears in the Browse DXL top-window
  • The Comment Block appears in the Browse DXL lower-window, when the file is selected in the top.

 Example.  Lets look at the deployed formal menu Addins.  Go here:

C:\Program Files (x86)\IBM\Rational\DOORS\9.5\lib\dxl\addins

  • This is the "top level folder".
  • Notice there is an "addins.hlp" and "addins.idx" files and is therefore "well constructed". 
  • Notice is has the "user" subfolder.
  • Edit the addins.idx file. 
  • Notice the comments. 
  • Notice that it defines that folder "user" is to be displayed as "User" menu in the formal module

Open the "user" sub-folder. 

  • Notice it has "user.idx" and "user.hlp" files, and is thus "well constructed" and eligible for the parent "addins" menu.
  • Edit the hlp and idx files. 
  • You may need to open notepad then find the files rather than click the file and try to find an application.

Open the DXL window.  "Browse" for DXL. 

  • Select "User-defined DXL library". Note that:
  • "User-defined DXL library" is the 1st line of the hlp file
  • The "description" lower pane is the rest of the hlp file.
  • Expand "User-defined DXL library"
  • Select "User Function".
  • Note that "User Function" is the 1st line of the "fn.dxl" file.
  • Note that "An example user function (lower pane) is the 1st comment block of "fn.dxl", which starts at about line 18.
  • Open a formal module
  • Notice there is a "User" menu (capital "U").  Recall above the "idx" file said to display folder "user" as "User".

Go back to "user" folder.  Create a new DXL file, perhaps "ABC.dxl"; give it a comment line and comment block.  Open a new module, notice "ABC" is shown even though it does not referenced in the "user.idx" file.

Back out.  Copy the "user" folder and create folder "user1".  Open it and rename 2 files to "user1".  Open a modoule and notice 2 "User" menus/

 2nd to last screen shot: My actual "addins" variable in the registry.

"addins" value is: i:\DXL-InProgress;i:\DXL-InProgress\Menu-Formal;i:\DXL-InProgress\Menu-Explorer;i:\DXL-InProgress\Menu-Landale.

Therefore these locations are available as top-level folders for addins:

  • i:\DXL-InProgress
  • i:\DXL-InProgress\Menu-Formal
  • i:\DXL-InProgress\Menu-Explorer
  • i:\DXL-InProgress\Menu-Landale

Note that there are no spaces adjacent to the semi-colons.  That is mandatory since folder names may not start nor end in a space.

Last screen shot: Actual network folder.

 


llandale - Wed Sep 10 13:11:08 EDT 2014

Re: Addins on Server
7XUT_Antonio_Norkus - Thu Sep 11 05:19:55 EDT 2014

Is it worth noting that if you update a menu item dxl of the following form, the menu item will only be update when:

- a module is re-opened

- DOORS is restarted

// menu

/*
 * menu
 */
 
 // menu code here

However, menu item dxl of the following form can be updated on-the-fly, by updating the .inc file, which helps when developing and deploying updates:

// menu

/*
 * menu
 */
#include <menuitem.inc>

 















 

 

Re: Addins on Server
llandale - Thu Sep 11 08:57:00 EDT 2014

7XUT_Antonio_Norkus - Thu Sep 11 05:19:55 EDT 2014

Is it worth noting that if you update a menu item dxl of the following form, the menu item will only be update when:

- a module is re-opened

- DOORS is restarted

// menu

/*
 * menu
 */
 
 // menu code here

However, menu item dxl of the following form can be updated on-the-fly, by updating the .inc file, which helps when developing and deploying updates:

// menu

/*
 * menu
 */
#include <menuitem.inc>

 















 

 

I was addressing when the menu itself changes, not the underlying code.
 

In any event I don't think whyour first example is true.  If you edit the DXL directly and then use the menu to invoke it, you get the changes; just like your 2nd example where you modify an include file.

Attr-DXL is different, it seems to be interpreted and stored when the module is 1st opened; the interpreted version is run.  So changing an include there does NOT change the DXL until U open the module (or modify the Attr-DX Definition).

-Louie

Re: Addins on Server
7XUT_Antonio_Norkus - Thu Sep 11 09:10:54 EDT 2014

llandale - Thu Sep 11 08:57:00 EDT 2014

I was addressing when the menu itself changes, not the underlying code.
 

In any event I don't think whyour first example is true.  If you edit the DXL directly and then use the menu to invoke it, you get the changes; just like your 2nd example where you modify an include file.

Attr-DXL is different, it seems to be interpreted and stored when the module is 1st opened; the interpreted version is run.  So changing an include there does NOT change the DXL until U open the module (or modify the Attr-DX Definition).

-Louie

Have you tried it Louie?

- open a module

- edit a menu dxl

- without closing the module, select the menu...you should find that the old version of the menu is executed...DOORS seems to cache the menu dxl when the module is opened

The reason the 2nd example updates, is that only the #include statement is cached, which is dynamically evaluated each time the menu is executed.

Anyhow, I find it a useful strategy.